package com.cauli.file.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cauli.file.mapper.ShareFileMapper;
import com.cauli.file.model.entity.ShareFile;
import com.cauli.file.model.vo.share.ShareFileListVO;
import com.cauli.file.service.ShareFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Cauli
 * @date 2023-03-20 12:00
 * @description 文件分享 服务实现类
 */
@Slf4j
@Service
@Transactional(rollbackFor=Exception.class)
public class ShareFileServiceImpl extends ServiceImpl<ShareFileMapper, ShareFile> implements ShareFileService {
    @Override
    public void batchInsertShareFile(List<ShareFile> shareFiles) {
        baseMapper.batchInsertShareFile(shareFiles);
    }

    @Override
    public List<ShareFileListVO> selectShareFileList(String shareBatchNum, String filePath) {
        return baseMapper.selectShareFileList(shareBatchNum, filePath);
    }
}
